package cre.tomcat7.ch00.core;

import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.core.StandardEngine;

import javax.servlet.ServletException;
import java.io.IOException;

/**
 * @Author penglai
 * @Date 2017/3/21.
 */
public class SimpleEngine extends StandardEngine {
    /**
     * Process the specified Request, to produce the corresponding Response,
     * by invoking the first Valve in our pipeline (if any), or the basic
     * Valve otherwise.
     *
     * @param request  Request to be processed
     * @param response Response to be produced
     * @throws IllegalStateException if neither a pipeline or a basic
     *                               Valve have been configured for this Container
     * @throws IOException           if an input/output error occurred while
     *                               processing
     * @throws ServletException      if a ServletException was thrown
     *                               while processing this request
     */
    @Override
    public void invoke(Request request, Response response) throws IOException, ServletException {
        System.out.println("in simpleEngine invoke");
    }
}
